import {Component} from '@angular/core';
import {IonicPage, NavController, NavParams} from 'ionic-angular';
import {ServiceCommitmentProvider} from "../../providers/service-commitment/service-commitment";
import {HttpClient} from "@angular/common/http";
import {CommitmengService} from "../../models/CommitmengService";

/**
 * Generated class for the ServiceCommitmentPage page.
 *
 * See https://ionicframework.com/docs/components/#navigation for more info on
 * Ionic pages and navigation.
 */

@IonicPage()
@Component({
    selector: 'page-service-commitment',
    templateUrl: 'service-commitment.html',
})
export class ServiceCommitmentPage {
     service:CommitmengService;
    constructor(public navCtrl: NavController,
                public navParams: NavParams,
                private serviceProvider: ServiceCommitmentProvider,
                private http: HttpClient) {
    }

    ionViewDidLoad() {
        console.log('ionViewDidLoad ServiceCommitmentPage');
        this.serviceProvider.getData().subscribe(data=>{
            this.service=<CommitmengService>data;
        })
    }

}
